<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var fullName = "ace";
        var obj = {
            fullName: "sabo",
            prop: {
                fullName: "luffy",
                getFullName: function() {
                    // console.log(this)
                    return this.fullName;
                }
            }
        };
        // console.log(obj.prop.getFullName());
        var getFullName = obj.prop.getFullName;
        // console.log(getFullName());


        class A {
            name = "ace"
            getName() {
                console.log(this.name)
            }
            setName() {

            }
        }

        class B extends A{
            superName = "sabo"
            getSuperName() {
                console.log(this.name, this.superName)
            }
        }
        var b = new B();
        b.getName();
        b.getSuperName();
    </script>
</body>
</html>